Skip to content

[PLT-1018] Add dataset.set_iam_integration() to select/deselect integrations #1622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 29, 2024

Conversation

paulnoirel
Copy link
Contributor

@paulnoirel paulnoirel commented May 20, 2024

Currently, users can create datasets with the SDK but can't modify the integration outside of the UI. This makes migration projects tedious since no automation is possible.

The current method brings a quick solution to this problem.

With this new method it is possible to:

  • Set IAM integration for integration id
# Get all IAM integrations
iam_integrations = client.get_organization().get_iam_integrations()

 # Get IAM integration id
iam_integration_id = [integration.uid for integration
   in iam_integrations
   if integration.name == "My S3 integration"][0]

dataset.add_iam_integration(iam_integration_id)
  • Set IAM integration for IAM integration object
# Get all IAM integrations
iam_integrations = client.get_organization().get_iam_integrations()

 # Get IAM integration object
iam_integration = [integration.uid for integration
   in iam_integrations
   if integration.name == "My S3 integration"][0]
 
dataset.add_iam_integration(iam_integration)
  • Remove IAM integration
dataset.remove_iam_integration()

@paulnoirel paulnoirel marked this pull request as ready for review May 20, 2024 19:26
@paulnoirel paulnoirel requested a review from a team as a code owner May 20, 2024 19:26
Copy link
Contributor

@sfendell-labelbox sfendell-labelbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments left. LGTM in concept, but some styling/consistency stuff.

@adrian-chang adrian-chang requested a review from a team May 22, 2024 22:05
@adrian-chang adrian-chang changed the title Add dataset.set_iam_integration() to select/deselect integrations [PLT-1018] Add dataset.set_iam_integration() to select/deselect integrations May 25, 2024
@adrian-chang
Copy link
Contributor

@paulnoirel please fill out https://labelbox.atlassian.net/browse/PLT-1018 with some details for QA

@paulnoirel paulnoirel merged commit e3b5b38 into develop May 29, 2024
21 of 22 checks passed
@paulnoirel paulnoirel deleted the PNO/set-iam-integration branch May 29, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants